# Maintainer: Joel Hansen <joelh@disroot.org>
pkgname=castor
pkgver=0.9.0
pkgrel=0
pkgdesc="Graphical browser for Gemini, Gopher and Finger"
url="https://sr.ht/~julienxx/Castor/"
license="MIT"
arch="all !s390x !riscv64" # limited by rust/cargo
makedepends="rust cargo gtk+3.0-dev openssl-dev"
source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~julienxx/castor/archive/$pkgver.tar.gz"

build() {
	cargo build --release --locked --verbose
}

check() {
	cargo test --release --locked -- --test-threads=1
}

package() {
	install -Dm755 target/release/castor "$pkgdir"/usr/bin/castor
	install -Dm644 data/Castor.desktop -t "$pkgdir"/usr/share/applications
	install -Dm644 data/org.typed-hole.castor.svg -t "$pkgdir"/usr/share/pixmaps
}

sha512sums="
a860f4df5034569675d09ca507e970c1bf22cab24810e12f2afcaa9f8a4a52b8ba019e0b956562953571d7995c1222a9fbc2f8acd09c13e94378dcee4e3c062d  castor-0.9.0.tar.gz
"
